returns the next time to start a process given the current time
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(DateTime), | intent(in) | :: | time |
current time |
||
type(CronTab), | intent(in) | :: | cron |
cron table |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=short), | public | :: | dt | = | 60 |
second |
|
logical, | public | :: | isTime |
FUNCTION CronNextTime & ! (time, cron) & ! RESULT (next) IMPLICIT NONE !Arguments with intent (in): TYPE (DateTime), INTENT (IN) :: time !!current time TYPE (CronTab), INTENT (IN) :: cron !!cron table !local declarationsnext TYPE (DateTime) :: next LOGICAL :: isTime INTEGER (KIND = short) :: dt = 60 !! second !-------------------------------------end of declarations---------------------- isTime = .FALSE. next = time + dt DO WHILE ( .NOT. isTime ) isTime = CronIsTime (next, cron) next = next + dt END DO RETURN END FUNCTION CronNextTime